home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)Z / (A)Z11.ADF / LOGO / LOGOSOURCE / y.tab.c < prev    next >
C/C++ Source or Header  |  1987-07-21  |  36KB  |  1,523 lines

  1. /*
  2.  * logo.y -> y.tab.c + plus edits here
  3.  */
  4. # define LOWPREC 257
  5. # define UNARY 258
  6. # define TWOOP 259
  7. # define ONEOP 260
  8. # define NOOP 261
  9. # define ONECOM 262
  10. # define CSTRING 263
  11. # define UINT 264
  12. # define LTO 265
  13. # define IFCOM 266
  14. # define LEDIT 267
  15. # define LIFTF 268
  16. # define LTRACE 269
  17. # define LPROC 270
  18. # define LPEND 271
  19. # define LAEND 272
  20. # define LGO 273
  21. # define CLIST 274
  22. # define TWOCOM 275
  23. # define NOCOM 276
  24. # define RUNCOM 277
  25. # define RNEND 278
  26. # define REPCOM 279
  27. # define THREECOM 280
  28.  
  29. # line 14
  30.  
  31. #include "logo.h"
  32.  
  33. char popname[NAMELEN+1];
  34. int multnum;
  35. struct object *multarg = 0;
  36. #include <setjmp.h>
  37. extern jmp_buf runret;
  38. jmp_buf yerrbuf;
  39. int catching = 0;
  40. int flagquit = 0;
  41. extern struct runblock *thisrun;
  42. #ifndef NOTURTLE
  43. extern int turtdes;
  44. extern struct display *mydpy;
  45. #endif
  46. int errtold = 0;
  47. int yyline =0;
  48. char ibuf[IBUFSIZ] ={0};
  49. char *ibufptr =NULL;
  50. char *getbpt =0;
  51. char titlebuf[100] ={0};
  52. char *titleptr =NULL;
  53. extern char *cpystr();
  54. int letflag =0;
  55. int topf =0;
  56. int pflag =0;
  57. char charib =0;
  58. int endflag =0, rendflag = 0;
  59. int traceflag =0;
  60. int currtest = 0;
  61. int argno =(-1);
  62. int *stkbase =NULL;
  63. int stkbi =0;
  64. struct stkframe *fbr =NULL;
  65. struct plist *proclist =NULL;
  66. #ifdef PAUSE
  67. int pauselev = 0;
  68. extern int psigflag,errpause;
  69. #endif
  70.  
  71. struct object *add(), *sub(), *mult(), *div(), *rem(), *and(), *or();
  72. struct object *greatp(), *lessp(), *lmax(), *lmin(), *lis();
  73. struct object *worcat(), *sencat(), *equal(), *lemp(), *comp();
  74. struct object *lnump(), *lsentp(), *lwordp(), *length(), *zerop();
  75. struct object *first(), *butfir(), *last(), *butlas(), *alllk();
  76. struct object *lnamep(), *lrandd(), *rnd(), *sq(), *lpow(), *lsin();
  77. struct object *lcos(), *latan(), *ltime(), *request(), *readlist();
  78. struct object *cmprint(), *cmtype(), *cmoutput(), *lsleep(), *lbreak();
  79. struct object *cmlocal(), *assign(), *cmedit(), *lstop(), *show(), *erase();
  80. struct object *help(), *describe(), *ltrace(), *luntrace(), *lbyecom();
  81. struct object *sometrace();
  82. #ifndef NOTURTLE
  83. struct object *getturtle(), *forward(), *back();
  84. struct object *left(), *right(), *penup(), *cmpendown(), *clearscreen();
  85. struct object *fullscreen(), *splitscreen(), *showturtle();
  86. struct object *hideturtle(), *textscreen(), *cmpenerase(), *pencolor();
  87. struct object *wipeclean(), *penmode(), *penreverse(), *shownp(), *towardsxy();
  88. struct object *setcolor(), *setxy(), *setheading();
  89. struct object *xcor(), *ycor(), *heading(), *getpen();
  90. struct object *scrunch(), *setscrunch();
  91. #endif
  92. struct object *ltopl(), *cmfprint(), *cmftype(), *pots(), *fput(), *lput();
  93. struct object *list(), *loread(), *lowrite(), *fileclose(), *cbreak();
  94. struct object *lfread(), *lfword(), *fileprint(), *filefprint();
  95. struct object *filetype(), *fileftype(), *callunix(), *repcount();
  96. #ifdef AMIGA
  97. struct object *chdir();
  98. #endif
  99. #ifdef DEBUG
  100. struct object *setdebquit(), *setmemtrace(), *setyaccdebug();
  101. #endif
  102. struct object *readchar(), *keyp(), *intpart(), *round(), *toascii();
  103. struct object *tochar(), *loflush(), *settest(), *memberp(), *item();
  104. #ifdef PAUSE
  105. struct object *unpause(), *dopause(), *setipause(), *setqpause(); /* PAUSE */
  106. struct object *seterrpause(), *clrerrpause();
  107. #endif
  108. #ifdef FLOOR
  109. struct object *hitoot(), *lotoot(), *lampon(), *lampoff();
  110. struct object *ftouch(), *btouch(), *ltouch(), *rtouch();
  111. #endif
  112. #ifndef SMALL
  113. struct object *gprop(), *plist(), *pps(), *remprop();
  114. #endif
  115. #ifdef SETCURSOR
  116. struct object *clrtxt(), *setcur();
  117. #endif
  118.  
  119. struct lexstruct keywords[] =
  120. {
  121.     "sum",TWOOP,add,NULL,
  122.     "difference",TWOOP,sub,"diff",
  123.     "product",TWOOP,mult,NULL,
  124.     "quotient",TWOOP,div,NULL,
  125.     "remainder",TWOOP,rem,"mod",
  126.     "both",TWOOP,and,"and",
  127.     "either",TWOOP,or,"or",
  128.     "greaterp",TWOOP,greatp,NULL,
  129.     "lessp",TWOOP,lessp,NULL,
  130.     "maximum",TWOOP,lmax,"max",
  131.     "minimum",TWOOP,lmin,"min",
  132.     "is",TWOOP,lis,NULL,
  133.     "word",TWOOP,worcat,NULL,
  134.     "sentence",TWOOP,sencat,"se",
  135.     "equalp",TWOOP,equal,NULL,
  136.     "emptyp",ONEOP,lemp,NULL,
  137.     "not",ONEOP,comp,NULL,
  138.     "numberp",ONEOP,lnump,NULL,
  139.     "sentencep",ONEOP,lsentp,NULL,
  140.     "wordp",ONEOP,lwordp,NULL,
  141.     "count",ONEOP,length,NULL,
  142.     "zerop",ONEOP,zerop,NULL,
  143.     "first",ONEOP,first,NULL,
  144.     "butfirst",ONEOP,butfir,"bf",
  145.     "last",ONEOP,last,NULL,
  146.     "butlast",ONEOP,butlas,"bl",
  147.     "thing",ONEOP,alllk,NULL,
  148.     "namep",ONEOP,lnamep,NULL,
  149.     "random",ONEOP,rnd,"rnd",
  150.     "sqrt",ONEOP,sq,NULL,
  151.     "pow",TWOOP,lpow,NULL,
  152.     "sin",ONEOP,lsin,NULL,
  153.     "cos",ONEOP,lcos,NULL,
  154.     "arctan",ONEOP,latan,"atan",
  155.     "time",NOOP,ltime,NULL,
  156.     "request",NOOP,request,NULL,
  157.     "readlist",NOOP,readlist,"rl",
  158.     "print",ONECOM,cmprint,"pr",
  159.     "type",ONECOM,cmtype,NULL,
  160.     "output",ONECOM,cmoutput,"op",
  161.     "wait",ONECOM,lsleep,NULL,
  162.     "local",ONECOM,cmlocal,NULL,
  163.     "make",TWOCOM,assign,NULL,
  164.     "if",IFCOM,0,NULL,
  165.     "to",LTO,0,NULL,
  166.     "end",LPEND,0,NULL,
  167.     "stop",NOCOM,lstop,NULL,
  168.     "break",NOCOM,lbreak,NULL,
  169.     "edit",LEDIT,cmedit,"ed",
  170.     "go",LGO,0,NULL,
  171.     "show",ONECOM,show,"po",
  172.     "erase",ONECOM,erase,"er",
  173.     "help",NOCOM,help,NULL,
  174.     "describe",ONECOM,describe,NULL,
  175.     "trace",LTRACE,sometrace,NULL,
  176.     "untrace",NOCOM,luntrace,NULL,
  177.     "goodbye",NOCOM,lbyecom,"bye",
  178. #ifndef NOTURTLE
  179.     "turtle",ONECOM,getturtle,"tur",
  180.     "forward",ONECOM,forward,"fd",
  181.     "back",ONECOM,back,"bk",
  182.     "left",ONECOM,left,"lt",
  183.     "right",ONECOM,right,"rt",
  184. #ifdef FLOOR
  185.     "hitoot",ONECOM,hitoot,"hit",
  186.     "lotoot",ONECOM,lotoot,"lot",
  187.     "lampon",NOCOM,lampon,"lon",
  188.     "lampoff",NOCOM,lampoff,"loff",
  189. #endif
  190.     "penup",NOCOM,penup,"pu",
  191.     "pendown",NOCOM,cmpendown,"pd",
  192.     "clearscreen",NOCOM,clearscreen,"cs",
  193.     "fullscreen",NOCOM,fullscreen,"full",
  194.     "splitscreen",NOCOM,splitscreen,"split",
  195.     "showturtle",NOCOM,showturtle,"st",
  196.     "hideturtle",NOCOM,hideturtle,"ht",
  197.     "textscreen",NOCOM,textscreen,"text",
  198.     "penerase",NOCOM,cmpenerase,"pe",
  199.     "pencolor",ONECOM,pencolor,"penc",
  200.     "setcolor",TWOCOM,setcolor,"setc",
  201.     "setxy",TWOCOM,setxy,NULL,
  202.     "setheading",ONECOM,setheading,"seth",
  203.     "wipeclean",NOCOM,wipeclean,"clean",
  204.     "penmode",NOOP,penmode,NULL,
  205.     "penreverse",NOCOM,penreverse,"px",
  206.     "shownp",NOOP,shownp,NULL,
  207.     "towardsxy",TWOOP,towardsxy,NULL,
  208. #ifdef FLOOR
  209.     "ftouch",NOOP,ftouch,"fto",
  210.     "btouch",NOOP,btouch,"bto",
  211.     "ltouch",NOOP,ltouch,"lto",
  212.     "rtouch",NOOP,rtouch,"rto",
  213. #endif
  214.     "xcor",NOOP,xcor,NULL,
  215.     "ycor",NOOP,ycor,NULL,
  216.     "heading",NOOP,heading,NULL,
  217.     "getpen",NOOP,getpen,NULL,
  218.     "scrunch",NOOP,scrunch,NULL,
  219.     "setscrunch",ONECOM,setscrunch,"setscrun",
  220. #endif
  221.     "toplevel",NOCOM,ltopl,NULL,
  222.     "fprint",ONECOM,cmfprint,"fp",
  223.     "ftype",ONECOM,cmftype,"fty",
  224.     "pots",NOCOM,pots,NULL,
  225.     "fput",TWOOP,fput,NULL,
  226.     "lput",TWOOP,lput,NULL,
  227.     "list",TWOOP,list,NULL,
  228.     "openread",ONEOP,loread,"openr",
  229.     "openwrite",ONEOP,lowrite,"openw",
  230.     "close",ONECOM,fileclose,NULL,
  231.     "fileread",ONEOP,lfread,"fird",
  232.     "fileword",ONEOP,lfword,"fiwd",
  233.     "fileprint",TWOCOM,fileprint,"fip",
  234.     "filefprint",TWOCOM,filefprint,"fifp",
  235.     "filetype",TWOCOM,filetype,"fity",
  236.     "fileftype",TWOCOM,fileftype,"fifty",
  237. #ifdef AMIGA
  238.     "chdir",ONECOM,chdir,"cd",
  239.     "dos",ONECOM,callunix,"unix",
  240. #else
  241.     "unix",ONECOM,callunix,NULL,
  242. #endif
  243.     "run",RUNCOM,0,NULL,
  244.     "repeat",REPCOM,0,NULL,
  245.     "repcount",NOOP,repcount,NULL,
  246. #ifdef DEBUG
  247.     "debquit",NOCOM,setdebquit,NULL,
  248.     "memtrace",NOCOM,setmemtrace,NULL,
  249.     "yaccdebug",NOCOM,setyaccdebug,NULL,
  250. #endif
  251.     "cbreak",ONECOM,cbreak,NULL,
  252.     "readchar",NOOP,readchar,"rc",
  253.     "keyp",NOOP,keyp,NULL,
  254.     "int",ONEOP,intpart,NULL,
  255.     "round",ONEOP,round,NULL,
  256.     "ascii",ONEOP,toascii,NULL,
  257.     "char",ONEOP,tochar,NULL,
  258.     "oflush",NOCOM,loflush,NULL,
  259. #ifndef SMALL
  260.     "gprop",TWOOP,gprop,NULL,
  261.     "plist",ONEOP,plist,NULL,
  262.     "pprop",THREECOM,0,NULL,
  263.     "pps",NOCOM,pps,NULL,
  264.     "remprop",TWOCOM,remprop,NULL,
  265. #endif
  266.     "test",ONECOM,settest,NULL,
  267.     "iftrue",LIFTF,(struct object *(*)())1,"ift",
  268.     "iffalse",LIFTF,0,"iff",
  269.     "memberp",TWOOP,memberp,NULL,
  270.     "item",TWOOP,item,"nth",
  271. #ifdef PAUSE
  272.     "continue",NOCOM,unpause,"co",
  273.     "pause",NOCOM,dopause,NULL,
  274.     "setipause",NOCOM,setipause,NULL,
  275.     "setqpause",NOCOM,setqpause,NULL,
  276.     "errpause",NOCOM,seterrpause,NULL,
  277.     "errquit",NOCOM,clrerrpause,NULL,
  278. #endif
  279. #ifdef SETCURSOR
  280.     "cleartext",NOCOM,clrtxt,"ct",
  281.     "setcursorxy",TWOCOM,setcur,"setcxy",
  282. #endif
  283.     NULL,NULL,NULL,NULL,
  284. };
  285.  
  286. #define uperror {errtold++;YYERROR;}
  287.  
  288. #ifdef PAUSE
  289. #define catch(X) {if(!setjmp(yerrbuf)){if(flagquit)errhand();catching++;X;catching=0;}else{catching=0;uperror}}
  290. #else
  291. #define catch(X) {X;}
  292. #endif
  293. #define yyclearin yychar = -1
  294. #define yyerrok yyerrflag = 0
  295. #ifndef YYMAXDEPTH
  296. #define YYMAXDEPTH 150
  297. #endif
  298. #ifndef YYSTYPE
  299. #define YYSTYPE int
  300. #endif
  301. YYSTYPE yylval;
  302. YYSTYPE yyval;
  303. # define YYERRCODE 256
  304.  
  305. #line 650
  306.  
  307.  
  308. extern struct object *makelist();
  309.  
  310. #ifdef PAUSE
  311. yylex1()
  312. #else
  313. yylex()
  314. #endif
  315. {
  316.     extern short yyerrflag;
  317.     register char *str;
  318.     char s[100];
  319.     char c;
  320.     register pc;
  321.     register i;
  322.     NUMBER dubl;
  323.     int floatflag;
  324.     FIXNUM fixn;
  325.  
  326.     if (yyerrflag) return(1);
  327.     else if (argno==0 && pflag!=1) {
  328.         if (fbr->oldyyc==-2) fbr->oldyyc= -1;
  329.         return(LAEND);
  330.     } else if (endflag==1 && pflag>1) {
  331.         endflag=0;
  332.         return(LPEND);
  333.     }
  334.     else if (pflag==2) {
  335.         pc= *(stkbase+stkbi++);
  336.         if (stkbi==PSTKSIZ-1) {
  337.             stkbase= (int *)(*(stkbase+PSTKSIZ-1));
  338.             stkbi=1;
  339.         }
  340.         yylval= *(stkbase+stkbi++);
  341.         if (pc==LPROC || pc==CSTRING || pc==UINT || pc==CLIST) {
  342.             yylval=(int)localize((struct object *)yylval);
  343.         }
  344.         if (stkbi==PSTKSIZ-1) {
  345.             stkbase= (int *)(*(stkbase+PSTKSIZ-1));
  346.             stkbi=1;
  347.         }
  348.         if (pc== -1) return(0);
  349.         else return(pc);
  350.     } else if (letflag==1) {
  351.         str=s;
  352.         while (!index(" \t\n[](){}\";",(c = getchar()))) {
  353.             if (c == '\\') c = getchar() /* |0200 */ ;
  354.             else if (c == '%') c = ' ' /* |0200 */ ;
  355.             *str++ = c;
  356.         }
  357.         charib=c;
  358.         *str='\0';
  359.         yylval=(int)localize(objcpstr(s));
  360.         letflag=0;
  361.         return(CSTRING);
  362.     } else if (letflag==2) {
  363.         str = s;
  364.         while (( (c=getchar())>='a' && c<='z' )
  365.                 || (c>='A' && c<='Z') || (c>='0' && c<='9')
  366.                 || (c=='.') || (c=='_') ) {
  367.             if (c>='A' && c<='Z') c += 040;
  368.             *str++ = c;
  369.         }
  370.         charib = c;
  371.         *str = '\0';
  372.         letflag = 0;
  373.         yylval = (int)localize(objcpstr(s));
  374.         return(CSTRING);
  375.     }
  376.     else if (letflag==3) {
  377.         yylval = (int)makelist();
  378.         letflag = 4;
  379.         return(CLIST);
  380.     }
  381.     else if (letflag==4) {
  382.         letflag = 0;
  383.         return(yylval = getchar());
  384.     }
  385.     while ((c=getchar())==' ' || c=='\t')
  386.         ;
  387.     if (rendflag) {
  388.         getbpt = 0;
  389.         if (rendflag < 3)
  390.             --rendflag;
  391.         else if (!thisrun || thisrun->svpflag)
  392.             rendflag = 0;
  393.         return(RNEND);
  394.     }
  395.  
  396.     if (c == '!')    /* comment feature */
  397.         while ((c=getchar()) && (c != '\n')) ;
  398.  
  399.     if ((c<'a' || c>'z') && (c<'A' || c>'Z')
  400.             && (c<'0' || c>'9') && c!='.') {
  401.         yylval=c;
  402.         if (c=='\"') letflag=1;
  403.         if (c==':') letflag=2;
  404.         if (c=='[') letflag=3;
  405.         return(c);
  406.     }
  407.     else if ((c>='0' && c<='9')|| c=='.') {
  408.         floatflag = (c=='.');
  409.         str=s;
  410.         while ((c>='0' && c<='9')||(c=='E')||(c=='e')||(c=='.')) {
  411.             *str++=c;
  412.             if (c=='.') floatflag++;
  413.             if ((c=='e')||(c=='E')) {
  414.                 floatflag++;
  415.                 c = getchar();
  416.                 if ((c=='+')||(c=='-')) {
  417.                     *str++ = c;
  418.                     c = getchar();
  419.                 }
  420.             } else c=getchar();
  421.         }
  422.         charib=c;
  423.         *str='\0';
  424.         if (floatflag) {
  425.             sscanf(s,EFMT,&dubl);
  426.             yylval=(int)localize(objdub(dubl));
  427.         } else {
  428.             sscanf(s,FIXFMT,&fixn);
  429.             yylval=(int)localize(objint(fixn));
  430.         }
  431.         return(UINT);
  432.     } else {
  433.         if (c < 'a') c += 040;
  434.         yylval=(int)(str=s);
  435.         *str++=c;
  436.         c=getchar();
  437.         if (c >= 'A' && c <= 'Z') c += 040;
  438.         while ((c>='a' && c<='z') || (c>='0' && c<='9')
  439.                 || (c=='.') || (c=='_')) {
  440.             *str++=c;
  441.             c=getchar();
  442.             if (c >= 'A' && c <= 'Z') c += 040;
  443.         }
  444.         charib=c;
  445.         *str='\0';
  446.         for (i=0; keywords[i].word; i++) {
  447.             if (!strcmp(yylval,keywords[i].word) ||
  448.                  (keywords[i].abbr && 
  449.                   !strcmp(yylval,keywords[i].abbr))) {
  450.                 yylval=i;
  451.                 return(keywords[i].lexret);
  452.             }
  453.         }
  454.         yylval=(int)localize(objcpstr(s));
  455.         return(LPROC);
  456.     }
  457. }
  458.  
  459. #ifdef PAUSE
  460. yylex() {
  461.     int x;
  462. #ifdef AMIGA
  463.     extern int quitsig;
  464.  
  465.     if (quitsig) {
  466.         quitsig = 0;
  467.         sigquit();
  468.     }
  469. #endif
  470.  
  471.     if (catching) return(yylex1());
  472.     if (!setjmp(yerrbuf)) {
  473.         if (flagquit) errhand();
  474.         catching++;
  475.         x = yylex1();
  476.         catching=0;
  477.         return(x);
  478.     } else {
  479.         catching=0;
  480.         return(12345);    /* This should cause an error up there */
  481.     }
  482. }
  483. #endif
  484.  
  485. int isuint(x)
  486. int x;
  487. {
  488.     return(x == UINT);
  489. }
  490.  
  491. int isstored(x)
  492. int x;
  493. {
  494.     return(x==UINT || x==LPROC || x==CSTRING || x==CLIST);
  495. }
  496.  
  497. yyprompt(clear) {
  498.     register int i;
  499.  
  500.     if (!ibufptr && !getbpt && !pflag) {
  501.         flagquit = 0;
  502. #ifdef PAUSE
  503.         if (pauselev > 0) {
  504.             for (i=pauselev; --i >=0; )
  505.                 putchar('-');
  506.         }
  507. #endif
  508.         putchar('?');
  509. #ifndef NOTURTLE
  510.         if ((turtdes<0) && clear)
  511.             (*mydpy->state)('*');
  512. #endif
  513.         fflush(stdout);
  514.     }
  515. }
  516.  
  517. short yyexca[] ={
  518. -1, 1,
  519.     0, -1,
  520.     -2, 0,
  521. -1, 20,
  522.     60, 22,
  523.     62, 22,
  524.     61, 22,
  525.     43, 22,
  526.     45, 22,
  527.     42, 22,
  528.     47, 22,
  529.     92, 22,
  530.     94, 22,
  531.     -2, 25,
  532. -1, 21,
  533.     60, 23,
  534.     62, 23,
  535.     61, 23,
  536.     43, 23,
  537.     45, 23,
  538.     42, 23,
  539.     47, 23,
  540.     92, 23,
  541.     94, 23,
  542.     -2, 26,
  543. -1, 153,
  544.     60, 0,
  545.     62, 0,
  546.     61, 0,
  547.     -2, 53,
  548. -1, 155,
  549.     60, 0,
  550.     62, 0,
  551.     61, 0,
  552.     -2, 55,
  553. -1, 157,
  554.     60, 0,
  555.     62, 0,
  556.     61, 0,
  557.     -2, 57,
  558. -1, 175,
  559.     0, 43,
  560.     42, 43,
  561.     47, 43,
  562.     92, 43,
  563.     94, 43,
  564.     262, 43,
  565.     265, 43,
  566.     267, 43,
  567.     268, 43,
  568.     269, 43,
  569.     271, 43,
  570.     272, 43,
  571.     273, 43,
  572.     275, 43,
  573.     276, 43,
  574.     278, 43,
  575.     280, 43,
  576.     -2, 41,
  577. -1, 176,
  578.     0, 44,
  579.     262, 44,
  580.     265, 44,
  581.     267, 44,
  582.     268, 44,
  583.     269, 44,
  584.     271, 44,
  585.     272, 44,
  586.     273, 44,
  587.     275, 44,
  588.     276, 44,
  589.     278, 44,
  590.     280, 44,
  591.     -2, 42,
  592. -1, 192,
  593.     256, 35,
  594.     60, 35,
  595.     62, 35,
  596.     61, 35,
  597.     43, 35,
  598.     42, 35,
  599.     47, 35,
  600.     92, 35,
  601.     94, 35,
  602.     -2, 24,
  603.     };
  604. # define YYNPROD 128
  605. # define YYLAST 1326
  606. short yyact[]={
  607.  
  608.   16,  97, 167,  63, 135,  98,  96, 110, 163, 128,
  609.  182,   2,  64, 165, 130,   9, 132, 101, 140,  70,
  610.   48,  49,  16, 102,  31,  18,  45,  60, 103,  68,
  611.   37,  53,  44,  21,  16,  35, 102,  99,  43, 100,
  612.   52, 103,  20,  41,  16,  40,  31,  39,  33,  17,
  613.  115, 187,  37, 185, 106, 105, 107,  35, 102,  99,
  614.   66, 100, 166, 103,  71, 113,  16,  38,  31,  76,
  615.   33,  17,  67, 104,  37, 101,  61,  71,  19,  35,
  616.   26,  32,  25,  17, 188,  14, 104, 134, 101,  13,
  617.   31,  12,  33,  17,  16,  62,  37, 164,  21,   6,
  618.    1,  35,   0,  32, 117, 118, 119,  20, 104,   0,
  619.  101,   0,   0,  36,  33,  17,   0,   0,  31,   0,
  620.    0, 159, 162,   0,  37,  32, 102,  99,   0, 125,
  621.    0, 103, 169, 170, 171,  36,   0,   0,   0,   0,
  622.    0,   0,  33,  17, 106, 105, 107,  32,   0,  21,
  623.   21,  21, 180,   0,   0,   0,  31,  36,  20,  20,
  624.   20,   0,  37,   0, 102,  99,   0, 125, 181, 103,
  625.    0, 184,   0,   0,   0,  32, 104,   0, 101,  36,
  626.   33,   0, 106, 105, 107,  79,  78,  77,  81,   0,
  627.    0,  85,  84,  86,  87, 189,  75,  91, 193,  88,
  628.    0,  82,  80,  89,   0,  90,  83,  36,   0,   0,
  629.    0,   0,   0,  32, 104,   0, 101,  21,   0,   0,
  630.   21,   0,   0,   0,   0,   0,  20,   0,   0,  20,
  631.    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  632.    0,   0,   0,   0,   0,  36, 190,   0,   0,  27,
  633.   28,  29,  15,   0, 192,  24,  22,   4,  23,   5,
  634.   42, 191, 133,  11,   0,   7,  10,  46, 129,  47,
  635.    8,  27,  28,  29,  15,  69,  30,  24,  22,   4,
  636.   23,   5,  42,   0,   0,  11,   0,   7,  10,  46,
  637.  131,  47,   8,  27,  28,  29,  15,   0,  30,  24,
  638.   22,   4,  23,   5,  42, 194,   0,  11,   0,   7,
  639.   10,  46,   3,  47,   8,  27,  28,  29,  15,   0,
  640.   30,  24,  22,   4,  23,   5,  42,   0,   0,  11,
  641.    0,   7,  10,  46,  59,  47,   8,   0,   0,   0,
  642.    0,   0,   0,  27,  28,  29,   0,  31,  30,  65,
  643.   54,   0,   0,  37,  42, 102,  99,   0, 125,   0,
  644.  103,  46,   0,  47,   0,   0,   0,   0,   0,   0,
  645.    0,  33,   0, 106, 105, 107,   0,   0, 139,   0,
  646.    0,  27,  28,  29,  31, 122,  30,   0,  54,   0,
  647.   37,   0,  42,   0,   0,  35,   0,   0,   0,  46,
  648.    0,  47,   0,   0,  32, 104,  31, 101,  33, 137,
  649.    0,   0,  37,   0,   0,   0,   0,  35,  31,   0,
  650.    0,   0,   0,   0,  37,   0,   0,   0,   0,  35,
  651.   33,   0,   0, 165, 102,  99,  36, 100,   0, 103,
  652.   31,  32,  33,   0,   0,   0,  37,   0,   0,   0,
  653.    0,  35, 106, 105, 107,   0,   0,   0,   0, 174,
  654.    0,   0, 178,  32,  33,  31,   0,   0,   0,   0,
  655.    0,  37,   0,  36,   0,  32,  35,  31,   0,   0,
  656.    0,   0,   0,  37, 104,   0, 101,   0,  35,  33,
  657.    0,   0,   0,   0,   0,  36,   0,  32,   0,  31,
  658.    0,  33,   0,   0,   0,  37,   0,  36,   0,   0,
  659.   35,   0, 186,   0,   0,   0,   0, 164,   0,   0,
  660.    0,   0,  32,  33,  31,   0,   0,   0,   0,  36,
  661.   37,   0,   0,   0,  32,  35,  31,   0,   0,   0,
  662.    0,   0,  37,   0,   0,   0,   0,  35,  33,   0,
  663.    0,   0,   0,   0,  36,   0,  32,   0,  31,   0,
  664.   33,   0,   0,   0,  37,   0,  36,   0,   0,  35,
  665.    0,   0,  27,  28,  29,   0,   0,  30,   0,  54,
  666.   31,  32,  33,  42,   0,   0,  37,   0,  36,   0,
  667.   46,  35,  47,  32,   0,   0,   0,   0,   0,   0,
  668.    0,   0,   0,   0,  33,   0, 176,   0,   0,  27,
  669.   28,  29,   0,  36,  30,  32,  54,   0,   0,   0,
  670.   42,   0,   0,   0,   0,  36,   0,  46,  93,  47,
  671.    0,  27,  28,  29,   0,   0,  30,  32,  54,   0,
  672.  158,   0,  42,  27,  28,  29,   0,  36,  30,  46,
  673.   54,  47,   0,   0,  42,   0,   0,   0,   0,   0,
  674.    0,  46, 156,  47,   0,  27,  28,  29,   0,  36,
  675.   30,   0,  54,   0,   0,   0,  42,   0,   0,   0,
  676.    0,   0,  31,  46,   0,  47,   0, 154,  37,   0,
  677.   27,  28,  29,  35,   0,  30,   0,  54,   0, 152,
  678.    0,  42,  27,  28,  29,   0,  33,  30,  46,  54,
  679.   47,   0,   0,  42,   0,   0,   0,   0,   0,   0,
  680.   46, 150,  47,   0,  27,  28,  29,   0,   0,  30,
  681.    0,  54,   0,   0,   0,  42,   0,   0,   0,  32,
  682.    0,  31,  46,   0,  47,   0, 148,  37,   0,  27,
  683.   28,  29,  35,   0,  30,   0,  54,   0, 146,   0,
  684.   42,  27,  28,  29,   0,  33,  30,  46,  54,  47,
  685.    0,  36,  42,   0,   0,   0,  31,   0,   0,  46,
  686.  144,  47,  37,  27,  28,  29,   0,  35,  30,   0,
  687.   54,   0,   0,   0,  42,   0,   0,   0,  32,   0,
  688.   33,  46, 142,  47,   0,  27,  28,  29,   0,   0,
  689.   30,  31,  54,   0,   0,   0,  42,  37,   0,   0,
  690.    0,   0,  35,  46,   0,  47,   0,   0,   0,   0,
  691.   36,   0,   0,  32,   0,  33,   0,  31,   0,   0,
  692.    0,   0,   0,  37,   0,   0,   0,   0,  35,  31,
  693.    0,   0,   0,   0,   0,  37,   0,   0,   0,   0,
  694.   35,  33,   0,   0,   0,  36,   0,   0,  32,   0,
  695.    0,  31,   0,  33,   0,   0,   0,  37,   0,   0,
  696.    0,   0,  35,   0,   0,   0,   0,   0,   0,   0,
  697.    0,   0,  31,   0,  32,  33,   0,   0,  37,   0,
  698.   36,   0,   0,  35,  73,   0,  32,  27,  28,  29,
  699.    0,   0,  30,   0,  54,   0,  33,   0,  42,   0,
  700.    0,   0,   0,   0,   0,  46,  36,  47,  32,   0,
  701.    0,  31,   0,   0,   0,   0,   0,  37,  36,   0,
  702.    0,   0,  35,  60,   0,   0,   0,   0,   0,  32,
  703.    0,   0,   0,   0,   0,  33,   0,   0,   0,   0,
  704.   36,   0,   0, 114,   0,   0,  27,  28,  29,   0,
  705.    0,  30,   0,  54,   0, 102,  99,  42, 100,   0,
  706.  103,  36,   0,   0,  46,   0,  47,   0,  32,   0,
  707.    0,   0,  61, 106, 105, 107,   0,   0, 109,   0,
  708.    0,  27,  28,  29,   0,   0,  30,   0,  54,   0,
  709.    0,   0,  42,   0,   0,   0,   0,   0,   0,  46,
  710.   36,  47,   0,   0,   0, 104,   0, 101,   0,   0,
  711.    0,   0,   0,  95,   0,   0,  27,  28,  29,   0,
  712.    0,  30,   0,  54,   0,   0,   0,  42,   0,   0,
  713.    0,   0,   0,   0,  46,   0,  47,   0,   0,  58,
  714.    0,   0,  27,  28,  29,   0,   0,  30,   0,  54,
  715.    0,  56,   0,  42,  27,  28,  29,   0,   0,  30,
  716.   46,  54,  47,   0,   0,  42,   0,   0,   0,   0,
  717.    0,   0,  46,  51,  47,   0,  27,  28,  29,   0,
  718.    0,  30,   0,  54,   0,   0,   0,  42,   0,   0,
  719.    0,   0,   0,   0,  46,   0,  47,  27,  28,  29,
  720.    0,   0,  30,   0,  54,   0,   0,   0,  42,   0,
  721.    0,   0,   0,   0,   0,  46,   0,  47,   0,   0,
  722.    0,  34,   0,   0,   0,   0,   0,   0,  50,  55,
  723.   57,   0,   0,   0,   0,   0, 111,  28,  29,   0,
  724.    0,  30,   0,  54,  72,  74,   0,  42,   0,  92,
  725.   94,   0,   0,   0,  46,   0,  47, 108,   0, 112,
  726.  116,   0,   0,   0,   0,   0,   0,   0, 120, 121,
  727.    0,   0,   0,   0,   0,   0, 123, 124,   0, 126,
  728.    0,   0,   0,   0, 127,   0,   0,   0,   0,   0,
  729.    0,   0,   0,   0, 136,   0,   0,   0,   0,   0,
  730.    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  731.    0,   0,   0,   0, 138,   0,   0,   0,   0,   0,
  732.    0, 141, 143, 145, 147, 149, 151, 153, 155, 157,
  733.    0,   0, 160, 161,   0,   0,   0, 168,   0,   0,
  734.    0,   0,   0, 172,   0, 173,   0, 175, 177,   0,
  735.    0,   0,   0,   0,   0,   0,   0,   0, 179,   0,
  736.    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  737.    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  738.    0,   0, 160, 183,   0,   0,   0,   0,   0,   0,
  739.    0,   0,   0,   0,   0, 179,   0,   0,   0,   0,
  740.    0,   0,   0,   0,   0, 160 };
  741. short yypact[]={
  742.  
  743. -1000,  56,-1000,-1000,  24,  24, 837, 815, 803,-1000,
  744.   17,-253,-1000,-1000,  17,-1000,-1000,-1000,-1000,  19,
  745. -1000,-1000, 648, 858, -74,-1000,-1000, 372, 777,-1000,
  746. -1000,-257,-273,-258,  -6, 742,-252, 897, 707,-1000,
  747. -1000,-1000,-1000,-1000,-1000,-1000, 858, 858,-1000,-1000,
  748.  933,-1000,-1000,-1000, 648, 313,-1000, 313,-1000,-1000,
  749. -1000,-1000, 858,-1000,-1000,-1000,  12,   6,-1000,-1000,
  750. -1000,-259, 313,-1000, 933,-1000,-1000,-1000,-1000,-1000,
  751. -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  752. -1000,-1000, 122,-1000,  -6,-1000,-1000, -75,-1000, 546,
  753.  524, 502, 490, 465, 443, 431, 406, 384,-1000,-1000,
  754.  858, 372, 392,-270,-1000, 858,  -6,  12,  12,  12,
  755.   -6, 313,-1000, 313, 933, 350, 313, 933,-1000,-1000,
  756. -1000,-1000,-1000,-1000,-1000,-1000,  84,-1000,  -6,-1000,
  757. -1000, -19,-1000, -19,-1000,-1000,-1000, -77,-1000, -77,
  758. -1000, -77,-1000,  16,-1000,  16,-1000,  16,-1000, -28,
  759.  313, 122, -28,-1000,-1000,-1000,-1000,-1000,  -6,-1000,
  760. -1000,-1000,  -6, 313,-1000,-1000,-1000, 933,-1000,  -6,
  761. -1000,-1000,-1000, 313,-1000, -10,-1000,-1000,  34,-1000,
  762. -1000,-1000,-1000,-1000,-1000 };
  763. short yypgo[]={
  764.  
  765.    0, 100,   9,  15,  99,1141, 334,  95,  91,  89,
  766.   85,  40,  31,  84,  82,  80,  10,   8,  78,  72,
  767.   69,  19,  67,  65,  62,  53,  51,  50,  60,  47,
  768.   45,  43,  38,  14,  32,  26,  25 };
  769. short yyr1[]={
  770.  
  771.    0,   1,   1,   1,   2,   2,   2,   2,   2,   2,
  772.    2,   2,   2,   2,   2,   2,   2,   2,   2,   4,
  773.    4,   4,   5,   5,  13,  10,  10,  11,  11,  12,
  774.   12,  12,  12,  12,  12,  12,  12,  12,  12,  12,
  775.   12,  12,  12,  12,  12,  12,  12,  12,  12,  12,
  776.   12,  12,  12,  12,  12,  12,  12,  12,  12,  12,
  777.   12,  12,  16,  16,   9,   9,   9,   9,  18,  18,
  778.   20,  20,  20,  20,  20,  20,  20,  20,  20,  20,
  779.   20,  20,  20,  20,  20,  19,  19,  21,  14,  14,
  780.   23,  23,  27,  27,  24,  25,  25,  25,  25,  26,
  781.   26,  22,  28,  28,  28,  15,  15,  15,  29,  30,
  782.   31,  32,  34,  35,  35,  33,   8,  36,  36,   7,
  783.    7,  17,  17,   6,   6,   6,   3,   3 };
  784. short yyr2[]={
  785.  
  786.    0,   0,   2,   2,   2,   2,   3,   2,   4,   2,
  787.    5,   2,   1,   2,   4,   2,   1,   1,   2,   1,
  788.    1,   1,   1,   1,   1,   1,   1,   1,   1,   3,
  789.    3,   2,   2,   2,   1,   1,   2,   3,   2,   3,
  790.    3,   3,   3,   2,   2,   3,   3,   3,   3,   3,
  791.    3,   3,   3,   3,   3,   3,   3,   3,   3,   4,
  792.    4,   3,   1,   2,   3,   2,   3,   2,   2,   2,
  793.    1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  794.    1,   1,   1,   1,   1,   1,   2,   2,   5,   2,
  795.    0,   1,   1,   2,   1,   0,   3,   2,   2,   1,
  796.    2,   1,   0,   2,   2,   1,   1,   1,   3,   3,
  797.    3,   2,   3,   4,   2,   1,   3,   4,   3,   0,
  798.    1,   1,   1,   1,   1,   0,   1,   1 };
  799. short yychk[]={
  800.  
  801. -1000,  -1,  -2, 256, 267, 269,  -4, 275, 280,  -3,
  802.  276, 273,  -8,  -9, -10, 262,  10,  59, -36, -18,
  803.  -11, -12, 266, 268, 265, -14, -15, 259, 260, 261,
  804.  264,  34,  91,  58,  -5,  45, 123,  40, -22, -29,
  805.  -30, -31, 270, -32, -34, -35, 277, 279,  -3,  -3,
  806.   -5, 256, -11, -12, 266,  -5, 256,  -5, 256,  -6,
  807.   10,  59,  -7, 256, 265,  -6, -28, -19,  10, 256,
  808.  -21,  58,  -5, 256,  -5, 270, -20, 261, 260, 259,
  809.  276, 262, 275, 280, 266, 265, 267, 268, 273, 277,
  810.  279, 271,  -5, 256,  -5, 256, 263, 274, 263,  43,
  811.   45,  94,  42,  47,  92,  61,  60,  62,  -5, 256,
  812.  259, 259,  -5, -23, 256, -27,  -5, -28, -28, -28,
  813.   -5,  -5,  -6,  -5,  -5,  45,  -5,  -5,  -2, 256,
  814.  -33, 278,  10, 256, -21, 263,  -5,  -6,  -5, 256,
  815.   93,  -5, 256,  -5, 256,  -5, 256,  -5, 256,  -5,
  816.  256,  -5, 256,  -5, 256,  -5, 256,  -5, 256, -16,
  817.   -5,  -5, -16, -17, 125,  41, -24, 272,  -5, -33,
  818.  -33, -33,  -5,  -5,  -6,  -5, 256,  -5,  -6,  -5,
  819.   -3, -17, -16,  -5, -17, -25,  -6, -26, -13,  -2,
  820.  256, 271, 264,  -2, 271 };
  821. short yydef[]={
  822.  
  823.    1,  -2,   2,   3,  20,  21,   0,   0,   0,  12,
  824.  125, 119,  16,  17, 125,  19, 126, 127, 102,   0,
  825.   -2,  -2,   0,   0,   0,  27,  28,   0,   0,  34,
  826.   35,   0,   0,   0,   0,   0,   0,   0,  90, 105,
  827.  106, 107, 101, 102, 102, 102,   0,   0,   4,   5,
  828.  125,   7,  22,  23,   0,   0,   9,   0,  11,  13,
  829.  123, 124,   0,  15, 120,  18,   0,   0,  65,  67,
  830.   85,   0,   0, 114, 125,  68,  69,  70,  71,  72,
  831.   73,  74,  75,  76,  77,  78,  79,  80,  81,  82,
  832.   83,  84,   0,  31,  32,  33,  36,   0,  38,   0,
  833.    0,   0,   0,   0,   0,   0,   0,   0,  43,  44,
  834.    0,   0,   0,   0,  89,  91,  92,   0,   0,   0,
  835.  111,   0,   6,   0, 125,   0,   0, 125, 103, 104,
  836.  116, 115,  64,  66,  86,  87,   0, 118,  29,  30,
  837.   37,  39,  40,  41,  42,  45,  46,  47,  48,  49,
  838.   50,  51,  52,  -2,  54,  -2,  56,  -2,  58,   0,
  839.   62,  62,   0,  61, 121, 122,  95,  94,  93, 108,
  840.  109, 110, 112,   0,   8,  -2,  -2, 125,  14, 113,
  841.  117,  59,  63,  29,  60,   0,  10,  88,   0,  97,
  842.   98,  99,  -2,  96, 100 };
  843. # define YYFLAG -1000
  844. # define YYERROR goto yyerrlab
  845. # define YYACCEPT return(0)
  846. # define YYABORT return(1)
  847.  
  848. /*       parser for yacc output  */
  849.  
  850. int    yydebug = 0; /* 1 for debugging */
  851. YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
  852. int    yychar = -1; /* current input token number */
  853. int    yynerrs = 0;  /* number of errors */
  854. short    yyerrflag = 0;    /* error recovery flag */
  855.  
  856. yyparse()
  857. {
  858.  
  859.     short    yys[YYMAXDEPTH];
  860.     short    yyj, yym;
  861.     register YYSTYPE *yypvt;
  862.     register short    yystate, *yyps, yyn;
  863.     register YYSTYPE *yypv;
  864.     register short    *yyxi;
  865.  
  866.     yystate = 0;
  867.     yychar = -1;
  868.     yynerrs = 0;
  869.     yyerrflag = 0;
  870.     yyps = &yys[-1];
  871.     yypv = &yyv[-1];
  872.  
  873. yystack:    /* put a state and value onto the stack */
  874.  
  875.     if ( yydebug  )
  876.         printf( "state %d, char 0%o\n", yystate, yychar );
  877.     if ( ++yyps > &yys[YYMAXDEPTH] ) {
  878.         yyerror( "yacc stack overflow" );
  879.         return(1);
  880.     }
  881.     *yyps = yystate;
  882.     ++yypv;
  883.     *yypv = yyval;
  884. yynewstate:
  885.  
  886.     yyn = yypact[yystate];
  887.  
  888.     if ( yyn <= YYFLAG )
  889.         goto yydefault; /* simple state */
  890.  
  891.     if ( yychar < 0 )
  892.         if ( (yychar = yylex()) < 0 )
  893.             yychar = 0;
  894.     if ( (yyn += yychar) < 0 || yyn >= YYLAST )
  895.         goto yydefault;
  896.  
  897.     if ( yychk[ yyn=yyact[ yyn ] ] == yychar ) {
  898.         /* valid shift */
  899.         yychar = -1;
  900.         yyval = yylval;
  901.         yystate = yyn;
  902.         if ( yyerrflag > 0 )
  903.             --yyerrflag;
  904.         goto yystack;
  905.     }
  906. yydefault:
  907.     /* default state action */
  908.  
  909.     if ( (yyn = yydef[yystate]) == -2 ) {
  910.         if ( yychar < 0 )
  911.             if ( (yychar = yylex()) < 0 )
  912.                 yychar = 0;
  913.         /* look through exception table */
  914.  
  915.         for ( yyxi = yyexca; (*yyxi != (-1)) || (yyxi[1] != yystate) ; yyxi += 2 )
  916.             ; /* VOID */
  917.  
  918.         for (yyxi += 2; *yyxi >= 0; yyxi += 2) {
  919.             if ( *yyxi == yychar )
  920.                 break;
  921.         }
  922.         if ( (yyn = yyxi[1]) < 0 )
  923.             return(0);   /* accept */
  924.     }
  925.  
  926.     if ( yyn == 0 ) {
  927.         /* error */
  928.         /* error ... attempt to resume parsing */
  929.  
  930.         switch ( yyerrflag ) {
  931.  
  932.         case 0:   /* brand new error */
  933.  
  934.             yyerror( "syntax error" );
  935. yyerrlab:
  936.             ++yynerrs;
  937.  
  938.         case 1:
  939.         case 2: /* incompletely recovered error ... try again */
  940.  
  941.             yyerrflag = 3;
  942.  
  943.             /* find a state where "error" is a legal shift action */
  944.  
  945.             while ( yyps >= yys ) {
  946.                 yyn = yypact[*yyps] + YYERRCODE;
  947.                 if ( yyn >= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ) {
  948.                     yystate = yyact[yyn];  /* simulate a shift of "error" */
  949.                     goto yystack;
  950.                 }
  951.                 yyn = yypact[*yyps];
  952.  
  953.                 /* the current yyps has no shift onn "error", pop stack */
  954.  
  955.                 if ( yydebug )
  956.                     printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
  957.                 --yyps;
  958.                 --yypv;
  959.             }
  960.  
  961.             /* there is no state on the stack with an error shift ... abort */
  962.  
  963. yyabort:
  964.             return(1);
  965.  
  966.  
  967.         case 3:  /* no shift yet; clobber input char */
  968.             if ( yydebug )
  969.                 printf( "error recovery discards char %d\n", yychar );
  970.  
  971.             if ( yychar == 0 )
  972.                 goto yyabort; /* don't discard EOF, quit */
  973.             yychar = -1;
  974.             goto yynewstate;   /* try again in the same state */
  975.  
  976.         }
  977.  
  978.     }
  979.  
  980.     /* reduction by production yyn */
  981.  
  982.     if ( yydebug )
  983.         printf("reduce %d\n", yyn);
  984.     yyps -= yyr2[yyn];
  985.     yypvt = yypv;
  986.     yypv -= yyr2[yyn];
  987.     yyval = yypv[1];
  988.     yym = yyn;
  989.     /* consult goto table to find next state */
  990.     yyn = yyr1[yyn];
  991.     yyj = yypgo[yyn] + *yyps + 1;
  992.     if ( yyj >= YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn )
  993.         yystate = yyact[yypgo[yyn]];
  994.     switch (yym) {
  995.         
  996. case 2:
  997. # line 272
  998. {
  999.         popname[0] = '\0';
  1000. #ifdef PAUSE
  1001.         if (psigflag) dopause();
  1002. #endif
  1003.         yyprompt(1);
  1004.     } break;
  1005. case 3:
  1006. # line 279
  1007. {
  1008.         popname[0] = '\0';
  1009.         if (!errtold) {
  1010.             logoyerror();
  1011.         }
  1012.         errtold = 0;
  1013.         errwhere();
  1014. #ifdef PAUSE
  1015.         if ((!errpause&&!pauselev) || !fbr)
  1016. #endif
  1017.             errzap();
  1018.         yyerrok;yyclearin;
  1019.         yyprompt(0);
  1020.     } break;
  1021. case 4:
  1022. # line 294
  1023. {
  1024.         catch(doedit(););
  1025.         yyval = -1;
  1026.     } break;
  1027. case 5:
  1028. # line 298
  1029. {
  1030.         catch(ltrace(););
  1031.         yyval = -1;
  1032.     } break;
  1033. case 6:
  1034. # line 302
  1035. {
  1036.         catch(yyval=(int)(*keywords[yypvt[-2]].lexval)(yypvt[-1]););} break;
  1037. case 7:
  1038. # line 304
  1039. {notenf(yypvt[-1]);uperror;} break;
  1040. case 8:
  1041. # line 305
  1042. {
  1043.         catch((*keywords[yypvt[-3]].lexval)(yypvt[-2],yypvt[-1]);); yyval = -1;} break;
  1044. case 9:
  1045. # line 307
  1046. {notenf(yypvt[-1]);uperror;} break;
  1047. case 10:
  1048. # line 308
  1049. {
  1050. #ifndef SMALL
  1051.         catch(pprop(yypvt[-3],yypvt[-2],yypvt[-1]););
  1052. #endif
  1053.         yyval = -1;
  1054.     } break;
  1055. case 11:
  1056. # line 314
  1057. {
  1058.         if (!errtold) {
  1059.             puts("Not enough inputs to pprop.");
  1060.         }
  1061.         uperror;
  1062.     } break;
  1063. case 12:
  1064. # line 320
  1065. { yyval= -1; } break;
  1066. case 13:
  1067. # line 321
  1068. {
  1069.         catch((*keywords[yypvt[-1]].lexval)();); yyval= -1;} break;
  1070. case 14:
  1071. # line 323
  1072. {
  1073.         catch(go(yypvt[-1]););
  1074.         yyval= -1;
  1075.         } break;
  1076. case 15:
  1077. # line 327
  1078. {notenf(yypvt[-1]);uperror;} break;
  1079. case 16:
  1080. # line 328
  1081. {
  1082.         if ((yypvt[-0] != -1) && !endflag) {
  1083.             if (!errtold)
  1084.                 pf1("You don't say what to do with %l.\n",yypvt[-0]);
  1085.             uperror;
  1086.         }
  1087.         yyval = yypvt[-0];
  1088.     } break;
  1089. case 17:
  1090. # line 336
  1091. {
  1092.         if (yypvt[-0]== -1)
  1093.             uperror
  1094.         else
  1095.             catch(proccreate(yypvt[-0]););
  1096.             yyval = -1;
  1097.     } break;
  1098. case 18:
  1099. # line 343
  1100. {
  1101.         if (thisrun && !pflag) {
  1102.             yyval = yypvt[-1];
  1103.         } else {
  1104.             if((yypvt[-1] != -1) && !endflag) {
  1105.                 if (!errtold)
  1106.                     pf1("You don't say what to do with %l\n",yypvt[-1]);
  1107.                 uperror;
  1108.             }
  1109.         }
  1110.     } break;
  1111. case 22:
  1112. # line 357
  1113. {
  1114.             if (yypvt[-0] == -1) {
  1115.                 if (!errtold) {
  1116.                     printf("%s didn't output.\n",
  1117.                         popname);
  1118.                 }
  1119.                 uperror;
  1120.             }
  1121.         } break;
  1122. case 24:
  1123. # line 368
  1124. { yyline=((struct object *)yypvt[-0])->obint; mfree(yypvt[-0]); yyval = 0;} break;
  1125. case 29:
  1126. # line 375
  1127. {
  1128.         catch(yyval=(int)(*keywords[yypvt[-2]].lexval)(yypvt[-1],yypvt[-0]););
  1129.     } break;
  1130. case 30:
  1131. # line 378
  1132. {op2er1(yypvt[-2],yypvt[-1]);uperror;} break;
  1133. case 31:
  1134. # line 379
  1135. {notenf(yypvt[-1]);uperror;} break;
  1136. case 32:
  1137. # line 380
  1138. {
  1139.         catch(yyval=(int)(*keywords[yypvt[-1]].lexval)(yypvt[-0]););
  1140.     } break;
  1141. case 33:
  1142. # line 383
  1143. {notenf(yypvt[-1]);uperror;} break;
  1144. case 34:
  1145. # line 384
  1146. {
  1147.         catch(yyval=(int)(*keywords[yypvt[-0]].lexval)(););
  1148.     } break;
  1149. case 36:
  1150. # line 388
  1151. { yyval=yypvt[-0]; } break;
  1152. case 37:
  1153. # line 389
  1154. { yyval=yypvt[-1]; } break;
  1155. case 38:
  1156. # line 390
  1157. {
  1158.         catch(yyval=(int)alllk(yypvt[-0]););
  1159.         } break;
  1160. case 39:
  1161. # line 393
  1162. {
  1163.         catch(yyval=(int)add(yypvt[-2],yypvt[-0]););
  1164.     } break;
  1165. case 40:
  1166. # line 396
  1167. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1168. case 41:
  1169. # line 397
  1170. {
  1171.         catch(yyval=(int)sub(yypvt[-2],yypvt[-0]););
  1172.     } break;
  1173. case 42:
  1174. # line 400
  1175. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1176. case 43:
  1177. # line 401
  1178. {
  1179.         catch(yyval=(int)opp(yypvt[-0]););
  1180.     } break;
  1181. case 44:
  1182. # line 404
  1183. {unerr('-');uperror;} break;
  1184. case 45:
  1185. # line 405
  1186. {
  1187.         catch(yyval=(int)lpow(yypvt[-2],yypvt[-0]););
  1188.     } break;
  1189. case 46:
  1190. # line 408
  1191. { inferr(yypvt[-2],yypvt[-1]);uperror; } break;
  1192. case 47:
  1193. # line 409
  1194. {
  1195.         catch(yyval=(int)mult(yypvt[-2],yypvt[-0]););
  1196.     } break;
  1197. case 48:
  1198. # line 412
  1199. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1200. case 49:
  1201. # line 413
  1202. {
  1203.         catch(yyval=(int)div(yypvt[-2],yypvt[-0]););
  1204.     } break;
  1205. case 50:
  1206. # line 416
  1207. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1208. case 51:
  1209. # line 417
  1210. {
  1211.         catch(yyval=(int)rem(yypvt[-2],yypvt[-0]););
  1212.     } break;
  1213. case 52:
  1214. # line 420
  1215. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1216. case 53:
  1217. # line 421
  1218. {
  1219.         catch(yyval=(int)equal(yypvt[-2],yypvt[-0]);)
  1220.     } break;
  1221. case 54:
  1222. # line 424
  1223. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1224. case 55:
  1225. # line 425
  1226. {
  1227.         catch(yyval=(int)lessp(yypvt[-2],yypvt[-0]););
  1228.     } break;
  1229. case 56:
  1230. # line 428
  1231. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1232. case 57:
  1233. # line 429
  1234. {
  1235.         catch(yyval=(int)greatp(yypvt[-2],yypvt[-0]););
  1236.     } break;
  1237. case 58:
  1238. # line 432
  1239. {inferr(yypvt[-2],yypvt[-1]);uperror;} break;
  1240. case 59:
  1241. # line 433
  1242. {
  1243.         catch(yyval=multiop(yypvt[-2],globcopy(multarg)););
  1244.         lfree(multarg);
  1245.         multarg = 0;
  1246.     } break;
  1247. case 60:
  1248. # line 438
  1249. {
  1250.         catch(yyval=multiop(yypvt[-2],globcopy(multarg)););
  1251.         lfree(multarg);
  1252.         multarg = 0;
  1253.     } break;
  1254. case 61:
  1255. # line 443
  1256. {yyval=yypvt[-1];} break;
  1257. case 62:
  1258. # line 445
  1259. {
  1260.         catch(multarg = globcons(yypvt[-0],0););
  1261.         mfree(yypvt[-0]);
  1262.         multnum = 1;
  1263.     } break;
  1264. case 63:
  1265. # line 450
  1266. {
  1267.         catch(multarg = globcons(yypvt[-1],multarg););
  1268.         mfree(yypvt[-1]);
  1269.         multnum++;
  1270.     } break;
  1271. case 64:
  1272. # line 455
  1273. {
  1274.         strcpy(titleptr,"\n");
  1275.         yyval=yypvt[-2];
  1276.     } break;
  1277. case 65:
  1278. # line 459
  1279. {
  1280.         strcpy(titleptr,"\n");
  1281.         yyval=yypvt[-1];
  1282.     } break;
  1283. case 66:
  1284. # line 463
  1285. {
  1286.         mfree(yypvt[-2]);
  1287.         terr();
  1288.         yyval= -1;
  1289.     } break;
  1290. case 67:
  1291. # line 468
  1292. {
  1293.         mfree(yypvt[-1]);
  1294.         terr();
  1295.         yyval= -1;
  1296.     } break;
  1297. case 68:
  1298. # line 473
  1299. {
  1300.         titleptr=cpystr(titlebuf,"to ",
  1301.             ((struct object *)(yypvt[-0]))->obstr,NULL);
  1302.         yyval=yypvt[-0];
  1303.     } break;
  1304. case 69:
  1305. # line 478
  1306. {
  1307.         if (!errtold) printf("Can't redefine primitive %s\n",
  1308.             keywords[yypvt[-0]].word);
  1309.         uperror;
  1310.     } break;
  1311. case 85:
  1312. # line 486
  1313. {titleptr=cpystr(titleptr," :",
  1314.             ((struct object *)(yypvt[-0]))->obstr,NULL);
  1315.         mfree(yypvt[-0]);
  1316.     } break;
  1317. case 86:
  1318. # line 490
  1319. {titleptr=cpystr(titleptr," :",
  1320.             ((struct object *)(yypvt[-0]))->obstr,NULL);
  1321.         mfree(yypvt[-0]);
  1322.     } break;
  1323. case 87:
  1324. # line 494
  1325. {yyval=yypvt[-0];} break;
  1326. case 88:
  1327. # line 495
  1328. {
  1329.         yyval=yypvt[-1];
  1330.         frmpop(yypvt[-1]);
  1331.     } break;
  1332. case 89:
  1333. # line 499
  1334. {
  1335.         if (!errtold) printf("Not enough inputs to %s\n",
  1336.             proclist->procname->obstr);
  1337.         uperror;
  1338.     } break;
  1339. case 92:
  1340. # line 505
  1341. {
  1342.         catch(argassign(yypvt[-0]););
  1343.     } break;
  1344. case 93:
  1345. # line 508
  1346. {
  1347.         catch(argassign(yypvt[-0]););
  1348.     } break;
  1349. case 94:
  1350. # line 511
  1351. {procprep();} break;
  1352. case 95:
  1353. # line 512
  1354. {yyline=1; yyval = -1;} break;
  1355. case 96:
  1356. # line 513
  1357. {
  1358.         popname[0] = '\0';
  1359. #ifdef PAUSE
  1360.         if (psigflag) dopause();
  1361.         if (thisrun && thisrun->str == (struct object *)(-1))
  1362.             yyprompt(1);
  1363. #endif
  1364.         yyval=yypvt[-0];
  1365.     } break;
  1366. case 97:
  1367. # line 522
  1368. {
  1369.         popname[0] = '\0';
  1370.         if (pflag) yyline++;
  1371. #ifdef PAUSE
  1372.         if (psigflag) dopause();
  1373.         if (thisrun && thisrun->str == (struct object *)(-1))
  1374.             yyprompt(1);
  1375. #endif
  1376.         yyval=yypvt[-0];
  1377.     } break;
  1378. case 98:
  1379. # line 532
  1380. {
  1381.         popname[0] = '\0';
  1382. #ifdef PAUSE
  1383.         if ((!errpause&&!pauselev) || !fbr)
  1384. #endif
  1385.             uperror;
  1386. #ifdef PAUSE
  1387.         if (!errtold) {
  1388.             logoyerror();
  1389.         }
  1390.         errtold = 0;
  1391.         errwhere();
  1392.         yyerrok;yyclearin;
  1393.         if (thisrun && thisrun->str == (struct object *)(-1))
  1394.             yyprompt(0);
  1395. #endif
  1396.     } break;
  1397. case 101:
  1398. # line 551
  1399. {
  1400.         catch(newproc(yypvt[-0]););
  1401.     } break;
  1402. case 102:
  1403. # line 554
  1404. {yyval = -1;} break;
  1405. case 103:
  1406. # line 555
  1407. {
  1408.         popname[0] = '\0';
  1409. #ifdef PAUSE
  1410.         if (psigflag) dopause();
  1411.         if (thisrun && thisrun->str == (struct object *)(-1))
  1412.             yyprompt(1);
  1413. #endif
  1414.         yyval=yypvt[-0];
  1415.     } break;
  1416. case 104:
  1417. # line 564
  1418. {
  1419.         popname[0] = '\0';
  1420. #ifdef PAUSE
  1421.         if ((!errpause&&!pauselev) || !fbr)
  1422. #endif
  1423.             uperror;
  1424. #ifdef PAUSE
  1425.         if (!errtold) {
  1426.             logoyerror();
  1427.         }
  1428.         errtold = 0;
  1429.         errwhere();
  1430.         yyerrok;yyclearin;
  1431.         if (thisrun && thisrun->str == (struct object *)(-1))
  1432.             yyprompt(0);
  1433. #endif
  1434.     } break;
  1435. case 108:
  1436. # line 582
  1437. {
  1438.         unrun();
  1439.         yyval = yypvt[-1];
  1440.         strcpy(popname,"run");
  1441.     } break;
  1442. case 109:
  1443. # line 587
  1444. {
  1445.         unrun();
  1446.         yyval = yypvt[-1];
  1447.         strcpy(popname,"repeat");
  1448.     } break;
  1449. case 110:
  1450. # line 592
  1451. {
  1452.         unrun();
  1453.         yyval = yypvt[-1];
  1454.         strcpy(popname,"if");
  1455.     } break;
  1456. case 111:
  1457. # line 597
  1458. {
  1459.         catch(dorun(yypvt[-0],(FIXNUM)0););
  1460.     } break;
  1461. case 112:
  1462. # line 600
  1463. {
  1464.         catch(dorep(yypvt[-1],yypvt[-0]););
  1465.     } break;
  1466. case 113:
  1467. # line 603
  1468. {
  1469.         {
  1470.             int i;
  1471.  
  1472.             catch(i = truth(yypvt[-2]););
  1473.             if (i) {
  1474.                 catch(dorun(yypvt[-1],(FIXNUM)0););
  1475.                 mfree(yypvt[-0]);
  1476.             } else {
  1477.                 catch(dorun(yypvt[-0],(FIXNUM)0););
  1478.                 mfree(yypvt[-1]);
  1479.             }
  1480.         }
  1481.     } break;
  1482. case 114:
  1483. # line 617
  1484. {
  1485.         if (!errtold) printf("Not enough inputs to if.\n");
  1486.         uperror;
  1487.     } break;
  1488. case 116:
  1489. # line 622
  1490. {
  1491.         unrun();
  1492.         yyval = yypvt[-1];
  1493.     } break;
  1494. case 117:
  1495. # line 626
  1496. {
  1497.         {
  1498.             int i;
  1499.  
  1500.             catch(i = truth(yypvt[-2]););
  1501.             if (i) {catch(dorun(yypvt[-1],(FIXNUM)0););}
  1502.             else {
  1503.                 catch(dorun(0,(FIXNUM)0););
  1504.                 mfree(yypvt[-1]);
  1505.             }
  1506.         }
  1507.     } break;
  1508. case 118:
  1509. # line 638
  1510. {
  1511.         if ((int)keywords[yypvt[-2]].lexval==currtest) {
  1512.             catch(dorun(yypvt[-1],(FIXNUM)0););
  1513.         } else {
  1514.             catch(dorun(0,(FIXNUM)0););
  1515.             mfree(yypvt[-1]);
  1516.         }
  1517.     } break;/* End of actions */
  1518.     }
  1519.     goto yystack;  /* stack new state and value */
  1520.  
  1521. }
  1522.  
  1523.